package com.bargate.domain.spring.expression.value;

import org.springframework.beans.factory.annotation.Value;

/**
 * Created by IntelliJ IDEA.
 * User: EAD-MASTER
 * Date: 19/09/2010
 * Time: 23:17:23
 * To change this template use File | Settings | File Templates.
 */
public class RegularExpressionsOperations {

    @Value("#{6.1e-4 * 1.2 matches '^[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?[-*+]?([0-9]+\\.?[0-9]*)?$'}")
    private Boolean expressionMatch1;

    @Value("#{'eldad.dor@yashir.co.il' matches '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}'}")
    private Boolean validEmailExpression;

    @Value("#{CocaCola.EmailAddress matches '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}'}")
    private Boolean companyEmailExpression;

    @Value("#{CocaCola.phoneNumber matches  '\\d{1,3}-\\d{3}-\\d{4}-\\d{3}'}")
    private Boolean companyPhoneNumberExpression;

    public Boolean getExpressionMatch1() {
        return expressionMatch1;
    }

    public Boolean getValidEmailExpression() {
        return validEmailExpression;
    }

    public Boolean getCompanyEmailExpression() {
        return companyEmailExpression;
    }

    public Boolean getCompanyPhoneNumberExpression() {
        return companyPhoneNumberExpression;
    }
}
